<template name="bank">
	<view class="qui-cells">
		<view class="qui-cell">
			<view class="cell-label">
				<text class="fs28 text-default">开户行</text>
			</view>
			<view class="cell-bd">
				<picker @change="bindPickerChange" :value="initData.index" :range="initData.list">
				     <view>{{BankInfo.BankName==''?initData.list[initData.index]:BankInfo.BankName}}</view>
				</picker>
			</view>
			<view class="cell-ft arrow-r"></view>
		</view>
		<view class="qui-cell">
			<view class="cell-label">
				<text class="fs28 text-default">开户人姓名</text>
			</view>
			<view class="cell-bd">
				<input type="text" class="cu-input fs26" v-model="BankInfo.Name" placeholder="填写开户人姓名">
			</view>
		</view>
		<view class="qui-cell">
			<view class="cell-label">
				<text class="fs28 text-default">银行卡号</text>
			</view>
			<view class="cell-bd">
				<input type="number" class="cu-input fs26" v-model="BankInfo.BankNo" placeholder="填写银行卡号">
			</view>
		</view>
	</view>
	
</template>

<script>
	
	export default {
		name: "bank",
	
		props: {
			BankInfo: {
				type: Object,//属性类型
				
			},
		
		},
		
		mounted:function(e){
		if(this.BankInfo.BankName=='' || this.BankInfo.BankName=='支付宝')	this.BankInfo.BankName='工商银行';
	
		},
		methods: {
			bindPickerChange: function(e) {
			            this.initData.index = e.target.value;
						this.BankInfo.BankName=this.initData.list[this.initData.index];
			}
		},
		data(){
			return {
				initData:{
					list: ['工商银行', '建设银行', '中国银行', '农业银行', '招商银行'],
					index: 0,
				}           
			}
		}
	}
	
	
</script>

<style>
</style>
